1 |
commit: 372231920a28a3ad271faa6577656ed74bd836be |
2 |
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jan 31 21:16:17 2017 +0000 |
4 |
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jan 31 21:16:17 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=37223192 |
7 |
|
8 |
net-p2p/mldonkey: bump to 3.1.6 |
9 |
|
10 |
Package-Manager: Portage-2.3.3, Repoman-2.3.1 |
11 |
|
12 |
net-p2p/mldonkey/Manifest | 1 + |
13 |
net-p2p/mldonkey/mldonkey-3.1.6.ebuild | 173 +++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 174 insertions(+) |
15 |
|
16 |
diff --git a/net-p2p/mldonkey/Manifest b/net-p2p/mldonkey/Manifest |
17 |
index 04c00e0..e180679 100644 |
18 |
--- a/net-p2p/mldonkey/Manifest |
19 |
+++ b/net-p2p/mldonkey/Manifest |
20 |
@@ -1 +1,2 @@ |
21 |
DIST mldonkey-3.1.5.tar.bz2 2847382 SHA256 74f9d4bcc72356aa28d0812767ef5b9daa03efc5d1ddabf56447dc04969911cb SHA512 96e75acf91d7ecc41490f898e06d284da27404c7e567f173936d8113885a3b4b6bc93341358f92a30d3f699eef681d97ce56414a37bb02a535ad2da4d4ad13a3 WHIRLPOOL b9e15809a49cc12e69a6d1188441e9d5603ec76cb7bfe2b2e0bfce3c50abb31296904c842f487076b227f577046ccbd3ceb7cd1a601d3faa6928b1bfde8c780f |
22 |
+DIST mldonkey-3.1.6.tar.bz2 2886916 SHA256 1b36b57c05a83c2e363c085bf8e80630884c6c92ecdeffc1ad5e1c39a98e043d SHA512 d0c7256c7c43934bc132183cfe0c8d85c61a874e295b86ba989f43fd4d9f3672bdf18439a9fefce52c30a6a8df08a5a464dcc21d4bf199d1b502fa344683081a WHIRLPOOL 1d5b6118dbe25fc3aad2cf9d57808cfc4c5466b4bb6b5c590c4541fdd400de0cf7ac55616f224eee763d88e08b03af26d873d9b6bf679808f7b5ade285f4d6d2 |
23 |
|
24 |
diff --git a/net-p2p/mldonkey/mldonkey-3.1.6.ebuild b/net-p2p/mldonkey/mldonkey-3.1.6.ebuild |
25 |
new file mode 100644 |
26 |
index 00000000..1e90565 |
27 |
--- /dev/null |
28 |
+++ b/net-p2p/mldonkey/mldonkey-3.1.6.ebuild |
29 |
@@ -0,0 +1,173 @@ |
30 |
+# Copyright 1999-2017 Gentoo Foundation |
31 |
+# Distributed under the terms of the GNU General Public License v2 |
32 |
+# $Id$ |
33 |
+ |
34 |
+EAPI="6" |
35 |
+WANT_AUTOCONF=2.5 |
36 |
+ |
37 |
+inherit versionator flag-o-matic eutils autotools toolchain-funcs user |
38 |
+ |
39 |
+IUSE="bittorrent doc fasttrack gd gnutella gtk guionly magic +ocamlopt" |
40 |
+ |
41 |
+DESCRIPTION="A multi-network P2P application written in Ocaml, with its own Gtk GUI, web and telnet interface" |
42 |
+HOMEPAGE="http://mldonkey.sourceforge.net/" |
43 |
+SRC_URI="https://github.com/ygrek/mldonkey/releases/download/release-$(replace_all_version_separators '-')/${P}.tar.bz2" |
44 |
+ |
45 |
+LICENSE="GPL-2" |
46 |
+SLOT="0" |
47 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~sparc ~x86 ~x86-fbsd" |
48 |
+ |
49 |
+RDEPEND="dev-lang/perl |
50 |
+ dev-ml/camlp4:= |
51 |
+ guionly? ( >=gnome-base/librsvg-2.4.0 |
52 |
+ >=dev-ml/lablgtk-2.6 ) |
53 |
+ gtk? ( >=gnome-base/librsvg-2.4.0 |
54 |
+ >=dev-ml/lablgtk-2.6[svg] ) |
55 |
+ gd? ( >=media-libs/gd-2.0.28[truetype] ) |
56 |
+ magic? ( sys-apps/file )" |
57 |
+ |
58 |
+DEPEND="${RDEPEND} |
59 |
+ >=dev-lang/ocaml-3.10.2[ocamlopt?]" |
60 |
+ |
61 |
+MLUSER="p2p" |
62 |
+ |
63 |
+pkg_setup() { |
64 |
+ if use gtk; then |
65 |
+ echo "" |
66 |
+ einfo "If the compile with gui fails, and you have updated Ocaml" |
67 |
+ einfo "recently, you may have forgotten that you need to run" |
68 |
+ einfo "/usr/portage/dev-lang/ocaml/files/ocaml-rebuild.sh" |
69 |
+ einfo "to learn which ebuilds you need to recompile" |
70 |
+ einfo "each time you update Ocaml to a different version" |
71 |
+ einfo "see the Ocaml ebuild for details" |
72 |
+ echo "" |
73 |
+ fi |
74 |
+ |
75 |
+ # dev-lang/ocaml creates its own objects but calls gcc for linking, which will |
76 |
+ # results in relocations if gcc wants to create a PIE executable |
77 |
+ if gcc-specs-pie ; then |
78 |
+ append-ldflags -nopie |
79 |
+ ewarn "Ocaml generates its own native asm, you're using a PIE compiler" |
80 |
+ ewarn "We have appended -nopie to ocaml build options" |
81 |
+ ewarn "because linking an executable with pie while the objects are not pic will not work" |
82 |
+ fi |
83 |
+} |
84 |
+ |
85 |
+src_prepare() { |
86 |
+ cd "${S}"/config |
87 |
+ eautoconf |
88 |
+ cd "${S}" |
89 |
+ use ocamlopt || sed -i -e "s/ocamlopt/idontwantocamlopt/g" "${S}/config/configure" || die "failed to disable ocamlopt" |
90 |
+ |
91 |
+ default |
92 |
+} |
93 |
+ |
94 |
+src_configure() { |
95 |
+ # the dirs are not (yet) used, but it doesn't hurt to specify them anyway |
96 |
+ |
97 |
+ # onlygui Disable all nets support, build only chosen GUI |
98 |
+ |
99 |
+ if use gtk || use guionly; then |
100 |
+ myconf="--enable-gui=newgui2" |
101 |
+ else |
102 |
+ myconf="--disable-gui" |
103 |
+ fi |
104 |
+ |
105 |
+ if use guionly; then |
106 |
+ myconf="${myconf} --disable-multinet --disable-donkey" |
107 |
+ fi |
108 |
+ |
109 |
+ cd "${S}" |
110 |
+ |
111 |
+ local my_extra_libs |
112 |
+ if use gd; then |
113 |
+ my_extra_libs="-lpng" |
114 |
+ fi |
115 |
+ |
116 |
+ econf LIBS="${my_extra_libs}"\ |
117 |
+ --sysconfdir=/etc/mldonkey \ |
118 |
+ --sharedstatedir=/var/mldonkey \ |
119 |
+ --localstatedir=/var/mldonkey \ |
120 |
+ --enable-checks \ |
121 |
+ --disable-batch \ |
122 |
+ $(use_enable bittorrent) \ |
123 |
+ $(use_enable fasttrack) \ |
124 |
+ $(use_enable gnutella) \ |
125 |
+ $(use_enable gnutella gnutella2) \ |
126 |
+ $(use_enable gd) \ |
127 |
+ $(use_enable magic) \ |
128 |
+ ${myconf} |
129 |
+} |
130 |
+ |
131 |
+src_compile() { |
132 |
+ export OCAMLRUNPARAM="l=256M" |
133 |
+ emake |
134 |
+ |
135 |
+ if ! use guionly; then |
136 |
+ emake utils |
137 |
+ fi; |
138 |
+} |
139 |
+ |
140 |
+src_install() { |
141 |
+ local myext="" |
142 |
+ use ocamlopt || myext=".byte" |
143 |
+ use ocamlopt || export STRIP_MASK="*/bin/*" |
144 |
+ if ! use guionly; then |
145 |
+ for i in mlnet mld_hash get_range copysources subconv; do |
146 |
+ newbin $i$myext $i |
147 |
+ done |
148 |
+ use bittorrent && newbin make_torrent$myext make_torrent |
149 |
+ |
150 |
+ newconfd "${FILESDIR}/mldonkey.confd-2.8" mldonkey |
151 |
+ fperms 600 /etc/conf.d/mldonkey |
152 |
+ newinitd "${FILESDIR}/mldonkey.initd" mldonkey |
153 |
+ fi |
154 |
+ |
155 |
+ if use gtk; then |
156 |
+ for i in mlgui mlguistarter; do |
157 |
+ newbin $i$myext $i |
158 |
+ done |
159 |
+ make_desktop_entry mlgui "MLDonkey GUI" mldonkey "Network;P2P" |
160 |
+ newicon "${S}"/packages/rpm/mldonkey-icon-48.png ${PN}.png |
161 |
+ fi |
162 |
+ |
163 |
+ if use doc ; then |
164 |
+ cd "${S}"/distrib |
165 |
+ dodoc ChangeLog *.txt |
166 |
+ |
167 |
+ insinto /usr/share/doc/${PF}/scripts |
168 |
+ doins kill_mldonkey mldonkey_command mldonkey_previewer make_buginfo |
169 |
+ |
170 |
+ cd "${S}"/docs |
171 |
+ dodoc *.txt *.tex *.pdf |
172 |
+ dohtml *.html |
173 |
+ |
174 |
+ cd "${S}"/docs/developers |
175 |
+ dodoc *.txt *.tex |
176 |
+ |
177 |
+ cd "${S}"/docs/images |
178 |
+ insinto /usr/share/doc/${PF}/html/images |
179 |
+ doins * |
180 |
+ fi |
181 |
+} |
182 |
+ |
183 |
+pkg_preinst() { |
184 |
+ if ! use guionly; then |
185 |
+ enewuser ${MLUSER} -1 -1 /home/p2p users |
186 |
+ fi |
187 |
+} |
188 |
+ |
189 |
+pkg_postinst() { |
190 |
+ if ! use guionly; then |
191 |
+ echo |
192 |
+ einfo "If you want to start MLDonkey as a system service, use" |
193 |
+ einfo "the /etc/init.d/mldonkey script. To control bandwidth, use" |
194 |
+ einfo "the 'slow' and 'fast' arguments. Be sure to have a look at" |
195 |
+ einfo "/etc/conf.d/mldonkey also." |
196 |
+ echo |
197 |
+ else |
198 |
+ echo |
199 |
+ einfo "Simply run mlgui to start the chosen MLDonkey gui." |
200 |
+ einfo "It puts its config files into ~/.mldonkey" |
201 |
+ fi |
202 |
+} |