clean cvs header
[gentoo-zh.git] / net-p2p / amule-dlp / amule-dlp-9999.ebuild
blob7d98b1fa87b56d802d11b8c313bc6685c39c8a4d
1 # Copyright 1999-2021 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=7
6 inherit autotools eutils flag-o-matic wxwidgets user git-r3
9 DESCRIPTION="aMule with DLP patch, the all-platform eMule p2p client"
10 HOMEPAGE="https://github.com/persmule/amule-dlp"
11 EGIT_REPO_URI="https://github.com/persmule/amule-dlp.git"
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS=""
16 IUSE="daemon debug +dynamic geoip +gtk nls remote stats unicode upnp"
17 REQUIRED_USE="|| ( gtk remote daemon )"
19 DEPEND="
20 =x11-libs/wxGTK-3.0*
21 >=dev-libs/boost-1.57[nls,threads,context]
22 >=dev-libs/crypto++-5
23 >=sys-libs/zlib-1.2.1
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 ) )
29 !net-p2p/amule
31 RDEPEND="${DEPEND} dynamic? ( net-p2p/amule-dlp-antileech )"
33 S=${WORKDIR}/${PN}
34 DOCS=( docs/{amulesig.txt,AUTHORS,ChangeLog,EC_Protocol.txt,ED2K-Links.HOWTO,INSTALL,README,TODO} )
36 pkg_setup() {
37 if use stats && ! use gtk; then
38 einfo "Note: You would need both the gtk and stats USE flags"
39 einfo "to compile aMule Statistics GUI."
40 einfo "I will now compile console versions only."
44 pkg_preinst() {
45 if use daemon || use remote; then
46 enewgroup p2p
47 enewuser p2p -1 -1 /home/p2p p2p
51 src_prepare() {
52 # fix the missing amule.xpm
53 cp "${FILESDIR}/amule.xpm" ./
55 # hack because of non-standard generation
56 cd src/pixmaps/flags_xpm
57 ./makeflags.sh
58 cd "$OLDPWD"
60 WANT_AUTOCONF="2.5" eautoreconf
61 WANT_AUTOMAKE="1.7" eautomake
63 epatch "${FILESDIR}/amule-dlp-scanner-header.patch"
66 src_configure() {
67 local myconf
69 WX_GTK_VER="3.0"
71 if use gtk; then
72 einfo "wxGTK with X / GTK support will be used"
73 need-wxwidgets unicode
74 else
75 einfo "wxGTK without X support will be used"
76 need-wxwidgets base-unicode
79 if use gtk ; then
80 use stats && myconf="${myconf}
81 --enable-wxcas
82 --enable-alc"
83 use remote && myconf="${myconf}
84 --enable-amule-gui"
85 else
86 myconf="
87 --disable-monolithic
88 --disable-amule-gui
89 --disable-wxcas
90 --disable-alc"
93 econf \
94 --with-wx-config=${WX_CONFIG} \
95 --with-boost \
96 --enable-amulecmd \
97 $(use_enable debug) \
98 $(use_enable !debug optimize) \
99 $(use_enable daemon amule-daemon) \
100 $(use_enable geoip) \
101 $(use_enable nls) \
102 $(use_enable remote webserver) \
103 $(use_enable stats cas) \
104 $(use_enable stats alcc) \
105 $(use_enable upnp) \
106 ${myconf} || die
109 src_install() {
110 emake DESTDIR="${D}" install || die
112 if use daemon; then
113 newconfd "${FILESDIR}"/amuled.confd amuled
114 newinitd "${FILESDIR}"/amuled.initd amuled
116 if use remote; then
117 newconfd "${FILESDIR}"/amuleweb.confd amuleweb
118 newinitd "${FILESDIR}"/amuleweb.initd amuleweb