Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-p2p/amule/, net-p2p/amule/files/
Date: Thu, 30 Apr 2020 12:00:35
Message-Id: 1588247995.8eb110137a6b823d357e5dc888a5dc3cfa367b9f.juippis@gentoo
1 commit: 8eb110137a6b823d357e5dc888a5dc3cfa367b9f
2 Author: Alexander Tsoy <alexander <AT> tsoy <DOT> me>
3 AuthorDate: Wed Apr 29 17:00:03 2020 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Thu Apr 30 11:59:55 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8eb11013
7
8 net-p2p/amule: Sync 2.3.2 with live ebuild
9
10 * Added missing dependencies on sys-devel/gettext, virtual/libintl,
11 sys-libs/readline.
12 * Added MimeType handler to a .desktop file (this also justifies added
13 dependency on dev-util/desktop-file-utils and xdg-utils eclass usage).
14
15 Signed-off-by: Alexander Tsoy <alexander <AT> tsoy.me>
16 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
17
18 net-p2p/amule/amule-2.3.2-r5.ebuild | 154 +++++++++++++++++++++
19 .../amule/files/amule-2.3.2-desktop-mimetype.patch | 30 ++++
20 2 files changed, 184 insertions(+)
21
22 diff --git a/net-p2p/amule/amule-2.3.2-r5.ebuild b/net-p2p/amule/amule-2.3.2-r5.ebuild
23 new file mode 100644
24 index 00000000000..50397fafc6d
25 --- /dev/null
26 +++ b/net-p2p/amule/amule-2.3.2-r5.ebuild
27 @@ -0,0 +1,154 @@
28 +# Copyright 1999-2020 Gentoo Authors
29 +# Distributed under the terms of the GNU General Public License v2
30 +
31 +EAPI=7
32 +WX_GTK_VER="3.0-gtk3"
33 +
34 +inherit wxwidgets xdg-utils
35 +
36 +if [[ ${PV} == 9999 ]] ; then
37 + EGIT_REPO_URI="https://github.com/amule-project/amule"
38 + inherit autotools git-r3
39 +else
40 + MY_P="${PN/m/M}-${PV}"
41 + SRC_URI="https://download.sourceforge.net/${PN}/${MY_P}.tar.xz"
42 + S="${WORKDIR}/${MY_P}"
43 + KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86"
44 +fi
45 +
46 +DESCRIPTION="aMule, the all-platform eMule p2p client"
47 +HOMEPAGE="http://www.amule.org/"
48 +
49 +LICENSE="GPL-2+"
50 +SLOT="0"
51 +IUSE="daemon debug geoip nls remote stats upnp +X"
52 +
53 +RDEPEND="
54 + dev-libs/boost:=
55 + dev-libs/crypto++:=
56 + sys-libs/binutils-libs:0=
57 + sys-libs/readline:0=
58 + sys-libs/zlib
59 + >=x11-libs/wxGTK-3.0.4:${WX_GTK_VER}[X?]
60 + daemon? ( acct-user/amule )
61 + geoip? ( dev-libs/geoip )
62 + nls? ( virtual/libintl )
63 + remote? (
64 + acct-user/amule
65 + media-libs/libpng:0=
66 + )
67 + stats? ( media-libs/gd:=[jpeg,png] )
68 + upnp? ( net-libs/libupnp:0 )
69 +"
70 +DEPEND="${RDEPEND}
71 + X? ( dev-util/desktop-file-utils )
72 +"
73 +BDEPEND="
74 + virtual/pkgconfig
75 + nls? ( sys-devel/gettext )
76 +"
77 +
78 +PATCHES=(
79 + "${FILESDIR}/${PN}-2.3.2-fix-crash-shared-dir-utf8.patch"
80 + "${FILESDIR}/${PN}-2.3.2-fix-crash-closing-last-search-tab-1.patch"
81 + "${FILESDIR}/${PN}-2.3.2-fix-crash-closing-last-search-tab-2.patch"
82 + "${FILESDIR}/${PN}-2.3.2-cryptopp-6.patch"
83 + "${FILESDIR}/${PN}-2.3.2-disable-version-check.patch"
84 + "${FILESDIR}/${PN}-2.3.2-fix-crash-when-shared-files-changed.patch"
85 + "${FILESDIR}/${PN}-2.3.2-libupnp-1.8.patch"
86 + "${FILESDIR}/${PN}-2.3.2-libupnp-1.6.patch"
87 + "${FILESDIR}/${PN}-2.3.2-Fixed-compilation-with-newer-bfd.patch"
88 + "${FILESDIR}/${PN}-2.3.2-desktop-mimetype.patch"
89 +)
90 +
91 +pkg_setup() {
92 + setup-wxwidgets
93 +}
94 +
95 +src_prepare() {
96 + default
97 +
98 + if [[ ${PV} == 9999 ]]; then
99 + ./autogen.sh || die
100 + fi
101 +}
102 +
103 +src_configure() {
104 + local myconf=(
105 + --with-denoise-level=0
106 + --with-wx-config="${WX_CONFIG}"
107 + --enable-amulecmd
108 + --with-boost
109 + $(use_enable debug)
110 + $(use_enable daemon amule-daemon)
111 + $(use_enable geoip)
112 + $(use_enable nls)
113 + $(use_enable remote webserver)
114 + $(use_enable stats cas)
115 + $(use_enable stats alcc)
116 + $(use_enable upnp)
117 + )
118 +
119 + if use X; then
120 + myconf+=(
121 + $(use_enable remote amule-gui)
122 + $(use_enable stats alc)
123 + $(use_enable stats wxcas)
124 + )
125 + else
126 + myconf+=(
127 + --disable-monolithic
128 + --disable-amule-gui
129 + --disable-alc
130 + --disable-wxcas
131 + )
132 + fi
133 +
134 + econf "${myconf[@]}"
135 +}
136 +
137 +src_install() {
138 + default
139 +
140 + if use daemon; then
141 + newconfd "${FILESDIR}"/amuled.confd-r1 amuled
142 + newinitd "${FILESDIR}"/amuled.initd amuled
143 + fi
144 + if use remote; then
145 + newconfd "${FILESDIR}"/amuleweb.confd-r1 amuleweb
146 + newinitd "${FILESDIR}"/amuleweb.initd amuleweb
147 + fi
148 +
149 + if use daemon || use remote; then
150 + keepdir /var/lib/${PN}
151 + fowners amule:amule /var/lib/${PN}
152 + fperms 0750 /var/lib/${PN}
153 + fi
154 +}
155 +
156 +pkg_postinst() {
157 + local ver
158 +
159 + if use daemon || use remote; then
160 + for ver in ${REPLACING_VERSIONS}; do
161 + if ver_test ${ver} -lt "2.3.2-r4"; then
162 + elog "Default user under which amuled and amuleweb daemons are started"
163 + elog "have been changed from p2p to amule. Default home directory have been"
164 + elog "changed as well."
165 + echo
166 + elog "If you want to preserve old download/share location, you can create"
167 + elog "symlink /var/lib/amule/.aMule pointing to the old location and adjust"
168 + elog "files ownership *or* restore AMULEUSER and AMULEHOME variables in"
169 + elog "/etc/conf.d/{amuled,amuleweb} to the old values."
170 +
171 + break
172 + fi
173 + done
174 + fi
175 +
176 + use X && xdg_desktop_database_update
177 +}
178 +
179 +pkg_postrm() {
180 + use X && xdg_desktop_database_update
181 +}
182
183 diff --git a/net-p2p/amule/files/amule-2.3.2-desktop-mimetype.patch b/net-p2p/amule/files/amule-2.3.2-desktop-mimetype.patch
184 new file mode 100644
185 index 00000000000..cd8ba4c2fc5
186 --- /dev/null
187 +++ b/net-p2p/amule/files/amule-2.3.2-desktop-mimetype.patch
188 @@ -0,0 +1,30 @@
189 +From 048e86d44e09ef9dc1897c432660a712109b263a Mon Sep 17 00:00:00 2001
190 +From: Werner Mahr <werner@×××××××××××××××.de>
191 +Date: Mon, 29 Apr 2019 18:37:35 +0200
192 +Subject: [PATCH] Added imetype-handler for amule ed2k-links. Patch taken from
193 + debian.
194 +
195 +---
196 + amule.desktop | 3 ++-
197 + 1 file changed, 2 insertions(+), 1 deletion(-)
198 +
199 +diff --git a/amule.desktop b/amule.desktop
200 +index 70be367af..1cfb38010 100644
201 +--- a/amule.desktop
202 ++++ b/amule.desktop
203 +@@ -1,6 +1,6 @@
204 + [Desktop Entry]
205 + Name=aMule
206 +-Exec=amule
207 ++Exec=amule %u
208 + Icon=amule
209 + Terminal=false
210 + Type=Application
211 +@@ -8,3 +8,4 @@ Categories=Network;P2P;
212 + Comment=A client for the eD2k network
213 + Comment[fr]=Un client pour le réseau eD2k
214 + Comment[tr]=eD2k ağı için istemci
215 ++MimeType=x-scheme-handler/ed2k;
216 +--
217 +2.26.2
218 +