4 |
4 |
EAPI=8
|
5 |
5 |
WX_GTK_VER="3.2-gtk3"
|
6 |
6 |
|
7 |
|
inherit autotools flag-o-matic wxwidgets xdg-utils
|
|
7 |
inherit autotools eapi9-ver flag-o-matic wxwidgets xdg-utils
|
8 |
8 |
|
9 |
9 |
if [[ ${PV} == 9999 ]] ; then
|
10 |
10 |
EGIT_REPO_URI="https://github.com/amule-project/amule"
|
... | ... | |
13 |
13 |
MY_P="${PN/m/M}-${PV}"
|
14 |
14 |
SRC_URI="https://download.sourceforge.net/${PN}/${MY_P}.tar.xz"
|
15 |
15 |
S="${WORKDIR}/${MY_P}"
|
16 |
|
KEYWORDS="~alpha amd64 ~arm ~mips ppc ppc64 ~riscv ~sparc x86"
|
|
16 |
KEYWORDS="~alpha ~amd64 ~arm ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
|
17 |
17 |
fi
|
18 |
18 |
|
19 |
19 |
DESCRIPTION="aMule, the all-platform eMule p2p client"
|
... | ... | |
21 |
21 |
|
22 |
22 |
LICENSE="GPL-2+"
|
23 |
23 |
SLOT="0"
|
24 |
|
IUSE="daemon debug geoip nls remote stats upnp +X"
|
|
24 |
IUSE="daemon debug geoip +gui nls remote stats upnp"
|
25 |
25 |
|
26 |
26 |
RDEPEND="
|
27 |
27 |
dev-libs/boost:=
|
... | ... | |
29 |
29 |
sys-libs/binutils-libs:0=
|
30 |
30 |
sys-libs/readline:0=
|
31 |
31 |
sys-libs/zlib
|
32 |
|
x11-libs/wxGTK:${WX_GTK_VER}=[X?]
|
|
32 |
x11-libs/wxGTK:${WX_GTK_VER}=
|
33 |
33 |
daemon? ( acct-user/amule )
|
34 |
34 |
geoip? ( dev-libs/geoip )
|
|
35 |
gui? ( x11-libs/wxGTK:${WX_GTK_VER}=[X] )
|
35 |
36 |
nls? ( virtual/libintl )
|
36 |
37 |
remote? (
|
37 |
38 |
acct-user/amule
|
... | ... | |
41 |
42 |
upnp? ( net-libs/libupnp:0 )
|
42 |
43 |
"
|
43 |
44 |
DEPEND="${RDEPEND}
|
44 |
|
X? ( dev-util/desktop-file-utils )
|
|
45 |
gui? ( dev-util/desktop-file-utils )
|
45 |
46 |
"
|
46 |
47 |
BDEPEND="
|
47 |
48 |
virtual/pkgconfig
|
... | ... | |
52 |
53 |
PATCHES=(
|
53 |
54 |
"${FILESDIR}/${PN}-2.3.2-disable-version-check.patch"
|
54 |
55 |
"${FILESDIR}/${PN}-2.3.3-fix-exception.patch"
|
55 |
|
"${FILESDIR}/${P}-autoconf-2.70.patch"
|
56 |
56 |
"${FILESDIR}/${PN}-2.3.3-backport-pr368.patch"
|
57 |
|
"${FILESDIR}/${PN}-2.3.3-wx3.2.patch"
|
|
57 |
"${FILESDIR}/${PN}-2.3.3-use-xdg-open-as-preview-default.patch"
|
58 |
58 |
)
|
59 |
59 |
|
60 |
|
pkg_setup() {
|
61 |
|
setup-wxwidgets
|
62 |
|
}
|
63 |
|
|
64 |
60 |
src_prepare() {
|
65 |
61 |
default
|
66 |
62 |
rm m4/boost.m4 || die
|
... | ... | |
73 |
69 |
}
|
74 |
70 |
|
75 |
71 |
src_configure() {
|
|
72 |
setup-wxwidgets
|
|
73 |
|
76 |
74 |
use debug || append-cppflags -DwxDEBUG_LEVEL=0
|
77 |
75 |
append-cxxflags -std=gnu++14
|
78 |
76 |
|
... | ... | |
91 |
89 |
$(use_enable upnp)
|
92 |
90 |
)
|
93 |
91 |
|
94 |
|
if use X; then
|
|
92 |
if use gui; then
|
95 |
93 |
myconf+=(
|
96 |
94 |
$(use_enable remote amule-gui)
|
97 |
95 |
$(use_enable stats alc)
|
... | ... | |
133 |
131 |
}
|
134 |
132 |
|
135 |
133 |
pkg_postinst() {
|
136 |
|
local ver
|
137 |
|
|
138 |
|
if use daemon || use remote; then
|
139 |
|
for ver in ${REPLACING_VERSIONS}; do
|
140 |
|
if ver_test ${ver} -lt "2.3.2-r4"; then
|
141 |
|
elog "Default user under which amuled and amuleweb daemons are started"
|
142 |
|
elog "have been changed from p2p to amule. Default home directory have been"
|
143 |
|
elog "changed as well."
|
144 |
|
echo
|
145 |
|
elog "If you want to preserve old download/share location, you can create"
|
146 |
|
elog "symlink /var/lib/amule/.aMule pointing to the old location and adjust"
|
147 |
|
elog "files ownership *or* restore AMULEUSER and AMULEHOME variables in"
|
148 |
|
elog "/etc/conf.d/{amuled,amuleweb} to the old values."
|
149 |
|
|
150 |
|
break
|
151 |
|
fi
|
152 |
|
done
|
|
134 |
if use daemon || use remote && ver_replacing -lt "2.3.2-r4"; then
|
|
135 |
elog "Default user under which amuled and amuleweb daemons are started"
|
|
136 |
elog "have been changed from p2p to amule. Default home directory have been"
|
|
137 |
elog "changed as well."
|
|
138 |
echo
|
|
139 |
elog "If you want to preserve old download/share location, you can create"
|
|
140 |
elog "symlink /var/lib/amule/.aMule pointing to the old location and adjust"
|
|
141 |
elog "files ownership *or* restore AMULEUSER and AMULEHOME variables in"
|
|
142 |
elog "/etc/conf.d/{amuled,amuleweb} to the old values."
|
153 |
143 |
fi
|
154 |
144 |
|
155 |
|
use X && xdg_desktop_database_update
|
|
145 |
use gui && xdg_desktop_database_update
|
156 |
146 |
}
|
157 |
147 |
|
158 |
148 |
pkg_postrm() {
|
159 |
|
use X && xdg_desktop_database_update
|
|
149 |
use gui && xdg_desktop_database_update
|
160 |
150 |
}
|